package com.ruoyi.team.mapper;

import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.team.domain.StockBill;
import com.ruoyi.team.domain.vo.StockBillVo;
import org.apache.ibatis.annotations.Param;

/**
 * 出入库单据Mapper接口
 *
 * @author xiaowai
 * @date 2022-11-27
 */
public interface StockBillMapper extends BaseMapper<StockBill> {

  /**
   * 查询出入库单据列表
   *
   * @param stockBill 出入库单据
   * @return 出入库单据集合
   */
  public List<StockBill> selectStockBillList(StockBill stockBill);

    void insertRelationToGoods(@Param("entity") StockBill entity, @Param("good") StockBillVo good);

  Long selectGoodsInStore(@Param("storeId") Long storeId, @Param("good") StockBillVo good);

  void insertGoodsInStore(@Param("storeId") Long storeId, @Param("good") StockBillVo good );

  void updateGoodsInStore(@Param("statusId") Long statusId, @Param("id") Long id, @Param("sum") Long sum);

  List<StockBillVo> selectGoodsByBillId(Long id);

  List<StockBillVo> selectByStockBillId(Long id);
}
